/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Microsoft YaHei', sans-serif;
}

/* 导航栏样式 */
header {
    background-color: rgba(0, 0, 0, 0.7);
    padding: 15px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    flex-wrap: wrap;
}

.logo {
    color: white;
    font-size: 24px;
    font-weight: bold;
}

nav {
    display: flex;
    align-items: center;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 30px;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-size: 16px;
    transition: opacity 0.3s;
}

nav ul li a:hover {
    color: rgba(255, 255, 255, 0.7); /* 实现变暗效果 */
}

/* 搜索框样式 */
.search-container {
    display: flex;
    align-items: center;
    margin-left: 20px;
}

.search-input {
    padding: 8px 12px;
    border: none;
    border-radius: 20px 0 0 20px;
    outline: none;
    width: 180px;
    transition: width 0.3s;
    background-color: rgba(255, 255, 255, 0.9);
}

.search-input:focus {
    width: 220px;
    background-color: rgba(217, 213, 213, 0.85);
}

.search-btn {
    padding: 8px 12px;
    border: none;
    border-radius: 0 20px 20px 0;
    background-color: #92816b;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s;
}

.search-btn:hover {
    background-color: #7c6f54;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .search-container {
        margin-left: 0;
        margin-top: 10px;
        width: 100%;
    }
    .search-input {
        width: 100%;
    }
    .search-input:focus {
        width: 100%;
    }
}